<?php
/**
 * Joomla! 1.5 component NS Pro
 *
 * @version $Id: nspro.php 2009-04-28 01:47:12 svn $
 * @author Christopher Mavros
 * @package Joomla
 * @subpackage NS Pro
 * @license GNU/GPL
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.model');

/**
 * NS Pro Component NS Pro Model
 *
 * @author      notwebdesign
 * @package     Joomla
 * @subpackage  NS Pro
 * @since 1.5
 */
class NsproModelNspro extends JModel {
    /**
     * Constructor
     */
    function __construct() {
        parent::__construct();
    }

    function getSubs() {
        $db =& JFactory::getDBO();

        $query = 'SELECT * FROM `#__nspro_subs` ORDER BY `id`';

        $db->setQuery( $query );
        $subs = $db->loadRowList();

        return $subs;
    }

    function getSubsCount() {
        $db =& JFactory::getDBO();

        $query = 'SELECT COUNT(*) FROM `#__nspro_subs`';

        $db->setQuery( $query );
        $sCount = $db->loadResult();

        return $sCount;
    }

}
?>